/*
 * @Description: 加油
 * @Author: Kerwin
 * @Date: 2025-11-07 17:47:46
 * @LastEditTime: 2025-11-15 14:40:32
 * @LastEditors:  Please set LastEditors
 */
import { defineStore } from 'pinia'

export const useOilStore = defineStore('oilStore', {
  state: () => ({
    goodsOilList: [] as any[], // 当前购物车商品列表
    goodsOil: {}, // 商品总数
    stationName:''
  }),
  actions: {
    addOil(oil: any) {
      this.goodsOil = { ...oil }
      this.stationName = oil.stationName
      this.goodsOilList = oil.oilList || []
    }
  },
  persist: true
})

export default useOilStore
